using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Input;
using System.Linq;

namespace CthulhuDomain.StageManagement
{
  public abstract class MenuCommand
  {
    protected Keys Key;
    protected IGameServiceProvider GameServiceProvider { get; set; }
    protected IGame Game;
    protected IContentManager ContentManager { get; set; }
    protected ISpriteBatch SpriteBatch { get; set; }

    protected MenuCommand(IGameServiceProvider gameServiceProvider)
    {
      Key = Keys.Enter;
      GameServiceProvider = gameServiceProvider;
      Game = gameServiceProvider.Game;
      ContentManager = gameServiceProvider.ContentManager;
      SpriteBatch = gameServiceProvider.SpriteBatch;
    }
    public virtual void Execute(){}

    public void Execute(Keys[] keys)
    {
      if (keys.Contains(Key))
        Execute();
    }
  }
}